<template>
  <svg aria-hidden="true" class="svg-icon" :width="props.size" :height="props.size" :style="{verticalAlign:verticalAlign}">
    <use :xlink:href="symbolId" :fill="props.fill" :stroke="props.stroke" :stroke-width="props.strokeWidth"/>
  </svg>
</template>

<script setup>
import { computed } from 'vue'
const props = defineProps({
  prefix: {
    type: String,
    default: 'icon'
  },
  name: {
    type: String,
    required: true
  },
  fill: {
    type: String,
    default: 'none'
  },
  stroke: {
    type: String,
    default: 'none'
  },
  strokeWidth: {
    type: String
  },
  size: {
    type: String,
    default: '1em'
  },
  verticalAlign: String
})

const symbolId = computed(() => `#${props.prefix}-${props.name}`)
</script>
